<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>评分</title>
    <style>
        .layui-form-item .layui-input-inline {
            width: 500px !important;
            margin-left: 30px;
        }

        .layui-col-md6 {
            padding: 7.5px !important;
        }
        .layui-form-radio *{
            font-size: 20px !important;
        }
        @media screen and (max-width: 450px) {
            .layui-form-item .layui-input-inline {
                display: block;
                float: none;
                left: -3px;
                width: auto !important;
                margin: 0 -30px 0px -4px !important;
            }
            .layui-card-header{
                font-size: 14px !important;
            }
        }
    </style>
    <link rel="stylesheet" href="/static/css/layui.css">
</head>
<body style="padding-left: 10px;padding-right: 10px;">
<!--<div class="searchTable">-->
<!--    <form class="layui-form" onsubmit="return false">-->
<!--        <div class="layui-form-item" style="width:250px">-->
<!--            <label class="layui-form-label">是否评分：</label>-->
<!--            <div class="layui-input-block">-->
<!--                <select class="layui-select" id="status" lay-filter="search">-->
<!--                    <option class="layui-select-group" selected="selected" value="0">未评分</option>-->
<!--                    <option class="layui-select-group" value="1">已经评分</option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
<!--        <button id="searchBtn" style="margin-left: 10%;display: none" class="layui-btn" data-type="reload"></button>-->
<!--    </form>-->
<!--</div>-->

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>请对其满意度打分</legend>
</fieldset>
<blockquote class="layui-elem-quote" style="font-size: 20px;" th:text="${userGradeText}"></blockquote>

<div class="layui-bg-gray" style="padding: 30px;" lay-filter="tool">
    <div class="layui-row layui-col-space15">
        <form class="layui-form" id="listForm" onsubmit="return false" lay-filter="form">
            <div class="layui-col-md6" th:each="task,iterStat : ${gradeList}">
                <center class="layui-card">
                    <strong><div class="layui-card-header" th:text="${task.name}" style="font-size: 30px;line-height: 60px;height: 60px;"></div></strong>
                    <div class="layui-card-body">
                        <br><span style="font-size: 20px">您的评价：</span><strong th:if="${task.score} == 0"><span th:text="待评价"
                                                                      style="color:#ea8372;font-size: 26px"></span><br></strong>
                        <strong th:if="${task.score} == 1"><span th:text="不满意"
                                                                 style="color:#f60808;font-size: 26px"></span><br></strong>
                        <strong th:if="${task.score} == 2"><span th:text="基本满意"
                                                                 style="color:#9689f1;font-size: 26px"></span><br></strong>
                        <strong th:if="${task.score} == 3"><span th:text="满意"
                                                                 style="color:#098ace;font-size: 26px"></span><br></strong>
                        <strong th:if="${task.score} == 4"><span th:text="非常满意"
                                                                 style="color:#2cef1a;font-size: 26px"></span><br></strong><br>
                        <span style="font-size: 20px">截至日期：</span><span th:text="${#dates.format(task.endTime, 'yyyy-MM-dd')}"
                                   style="font-size: 20px"></span><br>
                        <span th:if="${task.score != 0}">还能修改的次数：</span><span th:if="${task.score != 0}" th:text="${task.count}" style="font-size: 15px"></span><br>
                    </div>
                    <center style="padding-bottom: 20px">
                        <div class="layui-form-item" style="margin-top: 20px" th:if="${task.status == '0'}">
                            <div class="layui-input-inline" style="margin-left: calc(50% - 250px)">
                                <input th:name="${task.uid + '-score'}" type="radio" style="text-align: center;" value="4"
                                       title="非常满意"/>
                                <input th:name="${task.uid + '-score'}" type="radio" style="text-align: center;" value="3"
                                       title="满意"/>
                                <input th:name="${task.uid + '-score'}" type="radio" style="text-align: center;" value="2"
                                       title="基本满意"/>
                                <input th:name="${task.uid + '-score'}" type="radio" style="text-align: center;" value="1"
                                       title="不满意"/>
                                <br>
                                <textarea th:name="${task.uid + '-context'}" style="font-size: 18px;padding: 18px" cols="60" rows="3" th:text="${task.context}" placeholder="请输入管理服务改建建议"></textarea>
                            </div>
                        </div>
                        <textarea th:if="${task.status == '1'}" style="font-size: 18px;padding: 18px" cols="60" rows="3" th:text="${task.context}" disabled></textarea>
                        <a th:if="${task.status == '1' && task.count != 0}"
                           class="layui-btn layui-btn-primary layui-border-green layui-btn-ms" lay-active="grade"
                           th:data-id="${task.uid}"
                           th:data-name="${task.name}"
                           th:data-year="${task.year}">修改评价</a>
                        <a th:if="${task.status == '2'}"
                           class="layui-btn layui-btn-primary layui-border-red layui-btn-ms" disabled>已结束</a>
                    </center>
                </center>
            </div>
        </form>
    </div>
    <br>
    <center><a th:if="${isViewSub == '0'}" type="submit" style="height: 60px;font-size: 30px;width: 300px;line-height: 60px;background-color: #005ECC;" class="layui-btn" lay-active="sub">确定打分</a></center>
    <br>
</div>
<script src="/static/js/jquery-3.1.1.min.js"></script>
<script src="/static/layui.js" type="text/javascript"></script>
<script src="/static/js/userGrade.js" type="text/javascript"></script>
<form class="layui-form" style="display: none" id="commentForm" onsubmit="return false" lay-filter="scoreForm">
    <div class="layui-form-item" style="margin-top: 20px">
        <div class="layui-input-inline">
            <input name="score" type="radio" style="text-align: center" value="4" title="非常满意"/>
            <input name="score" type="radio" style="text-align: center" value="3" title="满意"/>
            <input name="score" type="radio" style="text-align: center" value="2" title="基本满意"/>
            <input name="score" type="radio" style="text-align: center" value="1" title="不满意"/>
        </div>
    </div>
    &nbsp;&nbsp;<textarea name="context" style="font-size: 18px;padding: 18px" cols="60" rows="3" placeholder="请输入管理服务改建建议"></textarea>
    <input id="uid" name="uid" type="hidden" value="">
</form>
</body>
</html>